﻿#include <iostream>

#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/patternlayout.h>
#include <log4cxx/fileappender.h>
#include <log4cxx/dailyrollingfileappender.h>

#include <kugou/base/net/HTTPServer.h>
#include <kugou/base/facility/log.h>

#ifdef _MSC_VER
std::string LogCFG_File = "config\\log.property";
std::string SysConfigure_File = "config\\sys.cfg";
std::wstring LogAppender = L"A3";
std::string Archive_File = "\\archive";
#elif defined __GNUC__
std::string LogCFG_File = "config/log.property";
std::string SysConfigure_File = "config/sys.cfg";
std::string LogAppender = "A3";
std::string Archive_File = "/archive";
#endif


using namespace std;

int main(int argc, char *argv[])
{
    log4cxx::PropertyConfigurator::configure(LogCFG_File);
    log4cxx::DailyRollingFileAppenderPtr t_appender(log4cxx::Logger::getRootLogger()->getAppender(LogAppender));
        
    LOG_R_I("Build date is [" << __DATE__ << " - " << __TIME__ << "].");    

    kugou::base::net::HTTPServer httpd;

#ifdef _WIN32
	WSADATA WSAData;
	WSAStartup(0x101, &WSAData);
#endif
    httpd.serv(8888,3);
    return 0;
}